<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>trunk.BIP</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th bgcolor="#70b0f0" class="navbar-select"
          >&nbsp;&nbsp;&nbsp;Home&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://code.google.com/p/bayesian-inference">Project Homepage</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;trunk ::
        Package&nbsp;BIP
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<h1 class="epydoc">Source Code for <a href="trunk.BIP-module.html">Package trunk.BIP</a></h1>
<pre class="py-src">
<a name="L1"></a><tt class="py-lineno"> 1</tt>  <tt class="py-line"><tt class="py-docstring">"""</tt> </tt>
<a name="L2"></a><tt class="py-lineno"> 2</tt>  <tt class="py-line"><tt class="py-docstring">Bayesian Inference Package containing usefull classes and functions</tt> </tt>
<a name="L3"></a><tt class="py-lineno"> 3</tt>  <tt class="py-line"><tt class="py-docstring">for doing inference in various applications.</tt> </tt>
<a name="L4"></a><tt class="py-lineno"> 4</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L5"></a><tt class="py-lineno"> 5</tt>  <tt class="py-line"><tt class="py-docstring">This is not a "Bayesian Statistics" package, i.e., it was not conceived  </tt> </tt>
<a name="L6"></a><tt class="py-lineno"> 6</tt>  <tt class="py-line"><tt class="py-docstring">to provide data analysis methods such as the one you can find </tt> </tt>
<a name="L7"></a><tt class="py-lineno"> 7</tt>  <tt class="py-line"><tt class="py-docstring">on a statistical package such as R (for example).</tt> </tt>
<a name="L8"></a><tt class="py-lineno"> 8</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L9"></a><tt class="py-lineno"> 9</tt>  <tt class="py-line"><tt class="py-docstring">Here, you will find some the basic building blocks those </tt> </tt>
<a name="L10"></a><tt class="py-lineno">10</tt>  <tt class="py-line"><tt class="py-docstring">sophisticated Bayesian regression methods are built from, such as </tt> </tt>
<a name="L11"></a><tt class="py-lineno">11</tt>  <tt class="py-line"><tt class="py-docstring">likelihood functions, MCMC samplers, SMC samplers, etc..</tt> </tt>
<a name="L12"></a><tt class="py-lineno">12</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L13"></a><tt class="py-lineno">13</tt>  <tt class="py-line"><tt class="py-docstring">This package exists because such basic tools are not readily accessible </tt> </tt>
<a name="L14"></a><tt class="py-lineno">14</tt>  <tt class="py-line"><tt class="py-docstring">in Task-oriented statistical software. From these tools, as this package matures,</tt> </tt>
<a name="L15"></a><tt class="py-lineno">15</tt>  <tt class="py-line"><tt class="py-docstring">you will be able to easily build a solution for your own inferential inquiries, </tt> </tt>
<a name="L16"></a><tt class="py-lineno">16</tt>  <tt class="py-line"><tt class="py-docstring">a solution which may not be available on standard statistical packages.</tt> </tt>
<a name="L17"></a><tt class="py-lineno">17</tt>  <tt class="py-line"><tt class="py-docstring">"""</tt> </tt>
<a name="L18"></a><tt class="py-lineno">18</tt>  <tt class="py-line"> </tt>
<a name="L19"></a><tt class="py-lineno">19</tt>  <tt class="py-line"><tt class="py-name">__docformat__</tt> <tt class="py-op">=</tt> <tt class="py-string">"restructuredtext en"</tt> </tt>
<a name="L20"></a><tt class="py-lineno">20</tt>  <tt class="py-line"> </tt>
<a name="L21"></a><tt class="py-lineno">21</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">logging</tt> </tt>
<a name="L22"></a><tt class="py-lineno">22</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt class="py-name">logging</tt><tt class="py-op">.</tt><tt class="py-name">handlers</tt> <tt class="py-keyword">import</tt> <tt class="py-name">RotatingFileHandler</tt> </tt>
<a name="L23"></a><tt class="py-lineno">23</tt>  <tt class="py-line"> </tt>
<a name="L24"></a><tt class="py-lineno">24</tt>  <tt class="py-line"> </tt>
<a name="L25"></a><tt class="py-lineno">25</tt>  <tt class="py-line"><tt id="link-0" class="py-name" targets="Variable trunk.BIP.Bayes.Samplers.MCMC.logger=trunk.BIP.Bayes.Samplers.MCMC-module.html#logger,Variable trunk.BIP.logger=trunk.BIP-module.html#logger,Variable trunk.BIP.logsetup.logger=trunk.BIP.logsetup-module.html#logger"><a title="trunk.BIP.Bayes.Samplers.MCMC.logger
trunk.BIP.logger
trunk.BIP.logsetup.logger" class="py-name" href="#" onclick="return doclink('link-0', 'logger', 'link-0');">logger</a></tt> <tt class="py-op">=</tt> <tt class="py-name">logging</tt><tt class="py-op">.</tt><tt class="py-name">getLogger</tt><tt class="py-op">(</tt><tt class="py-string">"BIP"</tt><tt class="py-op">)</tt> </tt>
<a name="L26"></a><tt class="py-lineno">26</tt>  <tt class="py-line"><tt id="link-1" class="py-name"><a title="trunk.BIP.Bayes.Samplers.MCMC.logger
trunk.BIP.logger
trunk.BIP.logsetup.logger" class="py-name" href="#" onclick="return doclink('link-1', 'logger', 'link-0');">logger</a></tt><tt class="py-op">.</tt><tt class="py-name">setLevel</tt><tt class="py-op">(</tt><tt class="py-name">logging</tt><tt class="py-op">.</tt><tt class="py-name">DEBUG</tt><tt class="py-op">)</tt> </tt>
<a name="L27"></a><tt class="py-lineno">27</tt>  <tt class="py-line"><tt class="py-comment"># create file handler which logs even debug messages</tt> </tt>
<a name="L28"></a><tt class="py-lineno">28</tt>  <tt class="py-line"><tt id="link-2" class="py-name" targets="Variable trunk.BIP.fh=trunk.BIP-module.html#fh,Variable trunk.BIP.logsetup.fh=trunk.BIP.logsetup-module.html#fh"><a title="trunk.BIP.fh
trunk.BIP.logsetup.fh" class="py-name" href="#" onclick="return doclink('link-2', 'fh', 'link-2');">fh</a></tt> <tt class="py-op">=</tt> <tt class="py-name">RotatingFileHandler</tt><tt class="py-op">(</tt><tt class="py-string">"/tmp/BIP.log"</tt><tt class="py-op">,</tt> <tt class="py-name">maxBytes</tt><tt class="py-op">=</tt><tt class="py-number">500000</tt><tt class="py-op">,</tt> <tt class="py-name">backupCount</tt><tt class="py-op">=</tt><tt class="py-number">2</tt><tt class="py-op">)</tt> </tt>
<a name="L29"></a><tt class="py-lineno">29</tt>  <tt class="py-line"><tt id="link-3" class="py-name"><a title="trunk.BIP.fh
trunk.BIP.logsetup.fh" class="py-name" href="#" onclick="return doclink('link-3', 'fh', 'link-2');">fh</a></tt><tt class="py-op">.</tt><tt class="py-name">setLevel</tt><tt class="py-op">(</tt><tt class="py-name">logging</tt><tt class="py-op">.</tt><tt class="py-name">DEBUG</tt><tt class="py-op">)</tt> </tt>
<a name="L30"></a><tt class="py-lineno">30</tt>  <tt class="py-line"><tt class="py-comment"># create console handler with a higher log level</tt> </tt>
<a name="L31"></a><tt class="py-lineno">31</tt>  <tt class="py-line"><tt id="link-4" class="py-name" targets="Variable trunk.BIP.ch=trunk.BIP-module.html#ch,Variable trunk.BIP.logsetup.ch=trunk.BIP.logsetup-module.html#ch"><a title="trunk.BIP.ch
trunk.BIP.logsetup.ch" class="py-name" href="#" onclick="return doclink('link-4', 'ch', 'link-4');">ch</a></tt> <tt class="py-op">=</tt> <tt class="py-name">logging</tt><tt class="py-op">.</tt><tt class="py-name">StreamHandler</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L32"></a><tt class="py-lineno">32</tt>  <tt class="py-line"><tt id="link-5" class="py-name"><a title="trunk.BIP.ch
trunk.BIP.logsetup.ch" class="py-name" href="#" onclick="return doclink('link-5', 'ch', 'link-4');">ch</a></tt><tt class="py-op">.</tt><tt class="py-name">setLevel</tt><tt class="py-op">(</tt><tt class="py-name">logging</tt><tt class="py-op">.</tt><tt class="py-name">ERROR</tt><tt class="py-op">)</tt> </tt>
<a name="L33"></a><tt class="py-lineno">33</tt>  <tt class="py-line"><tt class="py-comment"># create formatter and add it to the handlers</tt> </tt>
<a name="L34"></a><tt class="py-lineno">34</tt>  <tt class="py-line"><tt id="link-6" class="py-name" targets="Variable trunk.BIP.formatter=trunk.BIP-module.html#formatter,Variable trunk.BIP.logsetup.formatter=trunk.BIP.logsetup-module.html#formatter"><a title="trunk.BIP.formatter
trunk.BIP.logsetup.formatter" class="py-name" href="#" onclick="return doclink('link-6', 'formatter', 'link-6');">formatter</a></tt> <tt class="py-op">=</tt> <tt class="py-name">logging</tt><tt class="py-op">.</tt><tt class="py-name">Formatter</tt><tt class="py-op">(</tt><tt class="py-string">"%(asctime)s - %(name)s - %(levelname)s - %(message)s"</tt><tt class="py-op">)</tt> </tt>
<a name="L35"></a><tt class="py-lineno">35</tt>  <tt class="py-line"><tt id="link-7" class="py-name"><a title="trunk.BIP.ch
trunk.BIP.logsetup.ch" class="py-name" href="#" onclick="return doclink('link-7', 'ch', 'link-4');">ch</a></tt><tt class="py-op">.</tt><tt class="py-name">setFormatter</tt><tt class="py-op">(</tt><tt id="link-8" class="py-name"><a title="trunk.BIP.formatter
trunk.BIP.logsetup.formatter" class="py-name" href="#" onclick="return doclink('link-8', 'formatter', 'link-6');">formatter</a></tt><tt class="py-op">)</tt> </tt>
<a name="L36"></a><tt class="py-lineno">36</tt>  <tt class="py-line"><tt id="link-9" class="py-name"><a title="trunk.BIP.fh
trunk.BIP.logsetup.fh" class="py-name" href="#" onclick="return doclink('link-9', 'fh', 'link-2');">fh</a></tt><tt class="py-op">.</tt><tt class="py-name">setFormatter</tt><tt class="py-op">(</tt><tt id="link-10" class="py-name"><a title="trunk.BIP.formatter
trunk.BIP.logsetup.formatter" class="py-name" href="#" onclick="return doclink('link-10', 'formatter', 'link-6');">formatter</a></tt><tt class="py-op">)</tt> </tt>
<a name="L37"></a><tt class="py-lineno">37</tt>  <tt class="py-line"><tt class="py-comment"># add the handlers to logger</tt> </tt>
<a name="L38"></a><tt class="py-lineno">38</tt>  <tt class="py-line"><tt id="link-11" class="py-name"><a title="trunk.BIP.Bayes.Samplers.MCMC.logger
trunk.BIP.logger
trunk.BIP.logsetup.logger" class="py-name" href="#" onclick="return doclink('link-11', 'logger', 'link-0');">logger</a></tt><tt class="py-op">.</tt><tt class="py-name">addHandler</tt><tt class="py-op">(</tt><tt id="link-12" class="py-name"><a title="trunk.BIP.ch
trunk.BIP.logsetup.ch" class="py-name" href="#" onclick="return doclink('link-12', 'ch', 'link-4');">ch</a></tt><tt class="py-op">)</tt> </tt>
<a name="L39"></a><tt class="py-lineno">39</tt>  <tt class="py-line"><tt id="link-13" class="py-name"><a title="trunk.BIP.Bayes.Samplers.MCMC.logger
trunk.BIP.logger
trunk.BIP.logsetup.logger" class="py-name" href="#" onclick="return doclink('link-13', 'logger', 'link-0');">logger</a></tt><tt class="py-op">.</tt><tt class="py-name">addHandler</tt><tt class="py-op">(</tt><tt id="link-14" class="py-name"><a title="trunk.BIP.fh
trunk.BIP.logsetup.fh" class="py-name" href="#" onclick="return doclink('link-14', 'fh', 'link-2');">fh</a></tt><tt class="py-op">)</tt> </tt>
<a name="L40"></a><tt class="py-lineno">40</tt>  <tt class="py-line"> </tt><script type="text/javascript">
<!--
expandto(location.href);
// -->
</script>
</pre>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th bgcolor="#70b0f0" class="navbar-select"
          >&nbsp;&nbsp;&nbsp;Home&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://code.google.com/p/bayesian-inference">Project Homepage</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0.1 on Wed Jan 26 15:29:58 2011
    </td>
    <td align="right" class="footer">
      <a target="mainFrame" href="http://epydoc.sourceforge.net"
        >http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie();
  // -->
</script>
</body>
</html>
